package com.ewzj.bigdata.mvp.model.entity.resbean;

import android.os.Parcel;
import android.os.Parcelable;

import com.chad.library.adapter.base.entity.MultiItemEntity;

/**
 * Author:zhangjing
 * Time:2018/4/3  下午2:54
 * Name: this is SearchResultBean
 * Email:zhangjingworkmol@163.com
 */

public class SearchResultBean implements MultiItemEntity, Parcelable {

    /**
     * category_id : 4
     * keywords : 特朗普
     */

    private int category_id;
    private String keywords;
    private int type=3;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getCategory_id() {
        return category_id;
    }

    public void setCategory_id(int category_id) {
        this.category_id = category_id;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    @Override
    public int getItemType() {
        return type;
    }

    public SearchResultBean() {
    }

    public SearchResultBean(int category_id, String keywords, int type) {
        this.category_id = category_id;
        this.keywords = keywords;
        this.type = type;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.category_id);
        dest.writeString(this.keywords);
        dest.writeInt(this.type);
    }

    protected SearchResultBean(Parcel in) {
        this.category_id = in.readInt();
        this.keywords = in.readString();
        this.type = in.readInt();
    }

    public static final Parcelable.Creator<SearchResultBean> CREATOR = new Parcelable.Creator<SearchResultBean>() {
        @Override
        public SearchResultBean createFromParcel(Parcel source) {
            return new SearchResultBean(source);
        }

        @Override
        public SearchResultBean[] newArray(int size) {
            return new SearchResultBean[size];
        }
    };
}
